package ar.com.caeycae.dataentry;

import org.apache.log4j.Logger;
import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

public class WebUtil {

	private static final long TIME = 5000;
	private Logger LOGGER = Logger.getLogger(WebUtil.class);

	public WebElement findElement(WebDriver driver, By by)
	{
		try {
			WebElement elem = driver.findElement(by);
		} catch (NoSuchElementException e) {
			LOGGER.warn("No se encontro el elemento: " + by);
		}
		return null;
	}

	public void waitExplorer() {
		try {
			Thread.sleep(TIME);
		} catch (InterruptedException e) {}
	}
}
